<?php
namespace ImiDemo\HttpDemo\MainServer\Model;

use Imi\Model\Model;
use Imi\Model\Annotation\Table;
use Imi\Model\Annotation\Column;
use Imi\Model\Annotation\Entity;
use Imi\Model\Annotation\Relation\AutoSelect;
use Imi\Model\Annotation\Relation\PolymorphicToMany;

/**
 * Taggables
 * @Entity
 * @Table(name="tb_taggables", id={"tag_id", "taggable_id", "taggable_type"})
 * @property int $tagId
 * @property int $taggableId
 * @property int $taggableType
 * @property \Imi\Util\ArrayList $relations
 */
class Taggables extends Model
{
	/**
	 * tag_id
	 * @Column(name="tag_id", type="int", length=10, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=0, isAutoIncrement=false)
	 * @var int
	 */
	protected $tagId;

	/**
	 * 获取 tagId
	 *
	 * @return int
	 */ 
	public function getTagId()
	{
		return $this->tagId;
	}

	/**
	 * 赋值 tagId
	 * @param int $tagId tag_id
	 * @return static
	 */ 
	public function setTagId($tagId)
	{
		$this->tagId = $tagId;
		return $this;
	}

	/**
	 * taggable_id
	 * @Column(name="taggable_id", type="int", length=10, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=1, isAutoIncrement=false)
	 * @var int
	 */
	protected $taggableId;

	/**
	 * 获取 taggableId
	 *
	 * @return int
	 */ 
	public function getTaggableId()
	{
		return $this->taggableId;
	}

	/**
	 * 赋值 taggableId
	 * @param int $taggableId taggable_id
	 * @return static
	 */ 
	public function setTaggableId($taggableId)
	{
		$this->taggableId = $taggableId;
		return $this;
	}

	/**
	 * taggable_type
	 * @Column(name="taggable_type", type="tinyint", length=4, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=2, isAutoIncrement=false)
	 * @var int
	 */
	protected $taggableType;

	/**
	 * 获取 taggableType
	 *
	 * @return int
	 */ 
	public function getTaggableType()
	{
		return $this->taggableType;
	}

	/**
	 * 赋值 taggableType
	 * @param int $taggableType taggable_type
	 * @return static
	 */ 
	public function setTaggableType($taggableType)
	{
		$this->taggableType = $taggableType;
		return $this;
	}

}